// import 'element-ui/lib/theme-chalk/index.css'
import './style/main.scss'
import { createApp } from 'vue';
import App from './App'
const app = createApp(App);
export default app;
import store from './store'
import router from './router'
import Vuex from './store/index'
// import Element from 'element-ui'
// import icons from '@/icons' // icon
// import init from "@/package/common/initPc"
// import VueEsign from 'vue-esign'
// import componentsAll from "@/components/index"
// import utilsComponents from "@/components/formGenerator/utils/component"
import FGComponent from "@/package/index"
// Vue.config.productionTip = false
// Vue.use(Element, { size: 'small' })
// 富文本全局样式引入
import "quill/dist/quill.core.css";
import "quill/dist/quill.snow.css";
import "quill/dist/quill.bubble.css";

// 自定义指令 渲染富文本
app.directive("richText", (el, binding) => {
  if (binding.value) {
    let html = binding.value;
    try {
      html = decodeURIComponent(html.replace(/%(?!\d|[ABCDEF]+)/g, "%25"));
    } catch (e) { }
    html = "<div class='ql-editor'>" + html + "</div>"
    html = html.replace(/position: fixed;/g, "position: relative;");
    html = html.replace(/position: absolute;/g, "position: relative;");
    el.innerHTML = html;
  }
});


import ELink from "@/views/coms/components/ELink";
import VLink from "@/views/coms/components/VLink";
// Vue.component('ELink', ELink)
// Vue.component('VLink', VLink)
app.component("ELink", ELink);
app.component("VLink", VLink);

import md5 from 'js-md5';
// Vue.prototype.$md5 = md5;
app.config.globalProperties.$md5 = md5;

// new Vue({
//   router,
//   store,
//   render: h => h(App),
// }).$mount('#app')

// app.use(icons);
// app.use(init)
// app.use(VueEsign)
// app.use(componentsAll);
// app.use(utilsComponents);
app.use(FGComponent);
app.use(Vuex);
app.use(router);
app.use(store);
app.mount('#app');